<template>
	<view class="top">
		<my-topbar :tabList="tabList" @tabtap="tabtap" :tabIndex="tabIndex" :boxWith="boxWith"></my-topbar>
	</view>
</template>

<script>
	import myTopbar from '@/components/common/my-topbar/my-topbar.vue'
	export default {
		props: {
			tabIndex: {
				type: Number,
				default: 0
			}
		},
		components: {
			myTopbar
		},
		data() {
			return {
				tabList: [{
						id: 0,
						text: '我发送的'
					},
					{
						id: 1,
						text: '接收'
					}
				],
				boxWith: '50%'
			}
		},
		methods: {
			tabtap(id) {
				//this.tabIndex = id
				this.$emit('changTopbar', id)
			},
		}
	}
</script>

<style>
</style>
